"
" Milos Cubrilo ~/.vimrc
" December 2010.
"
"


set nocompatible
set encoding=utf-8
set number
set noerrorbells
set novisualbell
set backspace=indent,eol,start
set autoindent
set nobackup


syntax on
filetype plugin indent on
colorscheme koehler 


"Wildmenu options {
set wildmenu
set wildignore=*.pyc,*.pyo,*.bak,*.png,*.jpg,*.gif,*.dll,*.o,*.exe,*.obj
set wildmode=full
"}

" My mappings {
let mapleader = ","

nmap <leader>l :set list!<CR>
nmap <leader>n :bp<CR>
nmap <leader>m :bn<CR>
nmap <leader>w :w<CR>
nmap <leader>rc :e ~/.common/vim/vimrc<CR>
" }

" MiniBufExplorer options {
let g:miniBufExplMapCTabSwitchBufs = 1 
" }

" Autocommands {
if has("autocmd")
   
  " Syntax of these languages is fussy over tabs Vs spaces
  autocmd FileType make setlocal ts=8 sts=8 sw=8 noexpandtab
  autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab
  autocmd FileType python setlocal tabstop=8 expandtab shiftwidth=4 softtabstop=4

  " Customisations based on house-style (arbitrary)
  autocmd FileType html setlocal ts=2 sts=2 sw=2 expandtab
  autocmd FileType css setlocal ts=2 sts=2 sw=2 expandtab
  autocmd FileType javascript setlocal ts=4 sts=4 sw=4 noexpandtab
   
  " Treat .rss files as XML
  autocmd BufNewFile,BufRead *.rss set filetype=xml

  " Django settings
  autocmd FileType python set ft=python.django " For SnipMate
  autocmd FileType html set ft=htmldjango.html " For SnipMate

endif
" }

" GUI options {
if has("gui")

set guifont=DejaVu_Sans_Mono:h9
colorscheme railscasts

endif
" }

" Windows options {
if has("win32")

behave mswin
set bs=2

endif
" }
